import React,{useContext} from 'react'
import Header from '../../components/Header/Header'
import {MyContext} from "../../App"
import {actions} from "../../reducer/app"
const Mine = () => {
  const {state,dispatch}=useContext(MyContext)
  return (
    <div>
      <Header title="个人中心"></Header>
      <div>昵称:{state.userInfo.nickname}</div>
      <button onClick={()=>{
        dispatch(actions.changeUserInfo({}))
      }}>退出登陆</button>
    </div>
  )
}

export default Mine